<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>欢迎页</title>
</head>
<body>
	<h3>
		<%=session.getAttribute("userName")==null?" ":"欢迎"+session.getAttribute("userName")+"登录！" %>
	</h3>
	<ul>
		<li>三国演义</li>
		<li>水浒传</li>
		<li>红楼梦</li>
		<li>西游记</li>
	</ul>
	<!-- 绑定注销事件 -->
	<button onclick="remove()">注销</button>
	
	<script>
		function remove(){
			<%
				//注销session
				session.invalidate();
			%>
			//进行页面跳转，跳转到userLogin页面
			location.href="userLogin.jsp";
		}
	</script>
	
	
</body>
</html>